<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v-bind="http://www.w3.org/1999/xhtml"
      xmlns:v-on="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>搜索页面</title>
    <link rel="stylesheet" href="../lib/basic/css/bootstrap.min.css">
    <link href="../lib/AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css"/>
    <link href="../lib/AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css"/>
    <link href="../home/css/search.css" rel="stylesheet" type="text/css">
    <link href="../lib/basic/css/demo.css" rel="stylesheet" type="text/css"/>
    <link href="../home/css/seastyle.css" rel="stylesheet" type="text/css"/>
    <link rel="stylesheet" type="text/css" href="../lib/elementui/1.4.3/theme-default/index.css">
    <script type="text/javascript" src="../lib/basic/js/jquery-1.7.min.js"></script>
    <script type="text/javascript" src="../lib/vue/2.4.2/vue.js"></script>
    <script src="../lib/elementui/1.4.3/index.js"></script>
    <script src="../home/js/bootstrap.min.js"></script>
</head>
<body>
<div id="search">

    <!--顶部导航条 -->

    <iframe  MARGINWIDTH="0" MARGINHEIGHT="0" height="50px" scrolling="no"  width="100%" src="../home/otherHead.html"></iframe>

    <!--悬浮搜索框-->
    <div class="nav white">
        <div class="logo"><img src="../lib/images/logo.png"/></div>
        <div class="logoBig">
            <li><img src="../lib/images/logobig.png"/></li>
        </div>

        <div class="search-bar pr">
            <form >
                <input id="searchInput" name="index_none_header_sysc" type="text" placeholder="搜索"
                       autocomplete="off">
                <input id="ai-topsearch"  v-on:click=shopSelect(type); class="submit am-btn" value="搜索" index="1" type="button">
            </form>
        </div>
    </div>

    <div class="clear"></div>
    <b class="line" style="top:193px;"></b>
    <div class="search">
        <div class="search-list">
            <div class="nav-table">
                <a href="search.html">
                    <div class="long-title"><span class="all-goods">全部分类</span></div>
                </a>
                <div class="nav-cont">
                    <ul v-for="site in goodsType">
                        <li class="qc"><a v-bind:href="site.href">{{site.name}}</a></li>
                    </ul>
                </div>
            </div>
            <div class="am-g am-g-fixed">
                <div class="search-tab" style="margin-top: 25px;">
                    <a id="shop" v-on:click="comodity(3);" :plain="true" href="javascript:void(0)" style="background-color:#d2364c" ><span style="color: #FFFFFF">查看已入围商家商品</span></a>
                    <span>&nbsp;/&nbsp;</span>
                    <a id="sell" v-on:click="shopSelect(1);" :plain="true" href="javascript:void(0)" style="background-color:#d2364c"><span style="color: #FFFFFF">查看所有商品</span></a>
                </div>
                <div class="am-u-sm-12 am-u-md-12">
                    <div class="search-content">
                        <div class="clear"></div>
                        <ul id="ul" style="width:1200px; height:800px;margin-top:20px;position: relative">
                            <li div v-on:mouseover="over(lim.id)" v-on:mouseout="out(lim.id);" v-for="lim in limit" style="position: relative">
                                <a href="javascript:void(0);"><img v-on:click="Ontouch(lim)" :title="lim.commodityName.slice(0,24)" v-bind:src="lim.masterMap"/></a>
                                <p id="p1">
                                    <span id="spanpan">¥{{lim.commodityTrcPrc}}</span>
                                    <span id="spanpan1">销量{{lim.salesGross}}</span>
                                </p>
                                <p id="p2">
                                    <span>{{lim.commodityName}}</span>
                                </p>
                                <p style="margin:-3px 0 0 10px;overflow: hidden;white-space: nowrap">
                                    <span v-on:click="businesses(lim.businessesId);">{{lim.businessesName}}</span>
                                </p>
                                <div id="div2" style="margin-top: 15px;display: none ;" v-bind:id="(lim.id)">
                                    <div id="div2-1" :plain="true">
                                        <a href="javascript:;"><span id="spanpan2" v-on:click="addShopCart(lim)">加入购物车</span></a></div>
                                    <div id="div2-2">
                                        <input id="input1" class="on_show" v-on:click="on_showClick(lim,'on_showClick')"
                                               type="checkbox" style="width: 15px;"/>
                                        <span id="spanpan3">比较</span>
                                    </div>
                                </div>
                            </li>
                        </ul>
                    </div>
                    <!--对比-->
                    <div id="contrast" style="background-color: #f9f9f9;display: none;position: fixed;left: 35%;bottom: 50px;width: 600px;height: 150px;z-index: 9999">
                    <div style="border: 1px solid ghostwhite;width: 100%;height: 100%">
                        <div style="float: left;border: 1px solid silver;height: 100%"
                             v-for="contrast in contrastInformation">
                            <div style="width: 100px;">
                                <div><img id="src_2" v-bind:src="contrast.masterMap"></div>
                            </div>
                            <div style="width: 100px;text-align: center">
                                <span id="font_2">{{ contrast.commodityName }}</span>
                            </div>
                        </div>

                        <div style="width: 88px;height:100%;border: 1px solid silver;float: right">
                            <div id="cl" style="padding-top: 1px;padding-left: 73px;"
                                 v-on:click="on_hideClick">
                                <span ><a href="javascript:void(0)">X</a></span>
                            </div>
                            <div style="padding-left: 16px;padding-top: 40px">
                                <button id="tigger" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#myModal" style="padding: 4px 12px;">
                                    对比
                                </button>
                                <!-- 模态框（Modal） -->
                            </div>
                        </div>

                    </div>

                    </div>

                    <div class="search-side">
                    </div>
                    <div class="clear"></div>
                </div>
            </div>

        </div>
    </div>
    <iframe  MARGINWIDTH="0" MARGINHEIGHT="0" height="50px" scrolling="no"  width="100%" src="../home/otherFoot.html"></iframe>

    <!--引导 -->
    <div class="navCir">
        <li><a href="home.html"><i class="am-icon-home "></i>首页</a></li>
        <li><a href="sort.html"><i class="am-icon-list"></i>分类</a></li>
        <li><a href="../person/shopcart.html"><i class="am-icon-shopping-basket"></i>购物车</a></li>
        <li><a href="../person/index.html"><i class="am-icon-user"></i>我的</a></li>
    </div>

    <!--菜单 -->
    <div class=tip>
        <div id="sidebar">
            <div id="wrap">
                <div class="quick_toggle">
                    <li class="qtitem">
                        <a href="#"><span class="kfzx"></span></a>
                        <div class="mp_tooltip">客服中心<i class="icon_arrow_right_black"></i></div>
                    </li>
                    <li class="qtitem " id="qtitem" data-toggle="modal" data-target="#exampleModal">
                        <a href="#"><span class="kfzy"></span></a>
                        <div class="mp_tooltiq">预警<i class="icon_arrow_right_qlack"></i></div>
                    </li>
                    <!--二维码 -->
                    <li class="qtitem">
                        <a href="#none"><span class="mpbtn_qrcode"></span></a>
                        <div class="mp_qrcode" style="display:none;"><img src="../lib/images/weixin_code_145.png"/><i
                                class="icon_arrow_white"></i></div>
                    </li>
                    <li class="qtitem">
                        <a href="#top" class="return_top"><span class="top"></span></a>
                    </li>
                </div>

                <!--回到顶部 -->
                <div id="quick_links_pop" class="quick_links_pop hide"></div>
            </div>
        </div>
    </div>
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
         aria-hidden="true" align="center" >
        <div class="modal-dialog"  style="width: 55%;margin: auto">
            <div class="modal-content">
                <div class="modal-header" >
                    <button type="button" class="close"  data-dismiss="modal" aria-hidden="true">
                        &times;
                    </button>
                    <h4 class="modal-title" id="myModalLabel">
                        商品对比信息
                    </h4>
                </div>
                <div class="modal-body">
                    <!--<table class="table table-condensed table-bordered table-hover table-striped" style="table-layout: fixed" align="center">
                        <thead align="center">
                        <tr>
                            <td>货物名称</td>
                            <td>市场价格</td>
                            <td>入围价格</td>
                            <td>总销量</td>
                            <td>品牌信息</td>
                            <td>商品型号</td>
                            <td>供应商</td>
                            <td>生产厂商</td>
                            <td>操&nbsp;&nbsp;&nbsp;&nbsp;作</td>
                        </tr>
                        </thead>
                        <tbody>
                        <tr v-for="contrast in contrastInformation" id="bootstrapTr">
                            <td>{{contrast.commodityName}}</td>
                            <td>{{contrast.commodityMakPrc}}</td>
                            <td>{{contrast.commodityTrcPrc}}</td>
                            <td>{{contrast.salesGross}}</td>
                            <td>{{contrast.brand}}</td>
                            <td>{{contrast.model}}</td>
                            <td>{{contrast.businessesName}}</td>
                            <td>{{contrast.manufacturer}}</td>
                            <td><button type="button" class="am-btn am-btn-secondary am-radius"
                                        v-on:click="onAddDataBefore(contrast)">加入购物车
                            </button></td>
                        </tr>
                        </tbody>
                    </table>-->
                    <template>
                        <el-table :data="contrastInformation" border show-overflow-tooltip   align="center"   >
                            <el-table-column  prop="commodityName" label="货物名称" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column  prop="commodityMakPrc" label="市场价格" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column  prop="commodityTrcPrc" label="入围价格" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column  prop="salesGross" label="总销量" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column  prop="brand" label="品牌信息" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column  prop="model" label="商品型号" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column  prop="businessesName" label="供应商" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column  prop="manufacturer" label="生产厂商" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column label="操作" align="center">
                                <template scope="scope">
                                    <el-button type="success" size="small " v-on:click="onAddDataBefore(scope.row)">加入购物车</el-button>
                                </template>
                            </el-table-column>
                        </el-table>
                    </template>
                </div>

            </div><!-- /.modal-content -->
        </div><!-- /.modal -->
    </div>
</div>
</body>
<script type="text/javascript" src="../lib/basic/js/quick_links.js"></script>
<script type="text/javascript" src="../charge/search.js"></script>
<script type="text/javascript" >
    $('#myModal').on('shown.bs.modal', function (e) {
        // 关键代码，如没将modal设置为 block，则$modala_dialog.height() 为零
        $(this).css('display', 'block');
        var modalHeight=$(window).width() / 2 - $('#myModal .modal-dialog').width() / 2;
        $(this).find('.modal-dialog').css({
            'margin-left': modalHeight
        });
    });
</script>
</html>